package com.qf.administration.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.administration.entity.DriverManage;
import com.qf.administration.vo.DriverManageVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DriverManageMapper extends BaseMapper<DriverManage> {
    int deleteById(@Param("ids") int[] ids);

    //删除单个记录根据记录id  vehicle_id
    int deleteOneById(@Param("id") int id);

    //根据记录id vehicle_id 查询user_id
    int selectUserId(@Param("vehicle_id") int vehicle_id);

    //根据user_id查询car_id
    List<Integer> selectCarId(@Param("id") int id);

    //插入user_id
    int insertById(@Param("userId") int userId, @Param("carId") int carId);

    //分页
    List<DriverManageVO> selectList(@Param("workType") String workType, @Param("username") String username, @Param("sex") String sex, @Param("driverNumber") String driverNumber, @Param("busNumber") String busNumber);

    int updateById(@Param("userId") int userId, @Param("carId") int carId);
}